import {
  get
} from '../../utils/db'
Page({

  /**
   * 页面的初始数据
   */
  data: {
    types: []
  },
  async onLoad() {
    var result = await get("class").catch(err => console.log(err));
    this.setData({
      types: result.data
    })
  },
  //分类
  classClick(e) {
    var _id = e.currentTarget.id;
    wx.navigateTo({
      url: '../list/list?id=' + _id,
    })
  },

})